import { Line } from "@ant-design/charts";

export default ({ data }) => {
  if (!data || !data.dailyOrders) {
    return null;
  }

  const config = {
    data: data.dailyOrders,
    xField: "date",
    yField: "count",
    point: { size: 5 },
  };
  return <Line {...config} />;
};
